<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="/js/vue.js"></script>
  <script src="/js/axios.min.js"></script>
  <script src="../js/lib-master/index.js"></script>

  <link rel="stylesheet" href="../js/lib-master/theme-chalk/index.css">
  <link rel="stylesheet" href="/css/Backstage.css">
  <script src="/js/jquery.js"></script>
  
</head>

<body>
  <div class="container" id="app">
    <!-- 头顶导航栏 -->
    <div class="header">
      <div class="list">
        <el-breadcrumb separator-class="el-icon-arrow-right">
          <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
          <el-breadcrumb-item>商品管理</el-breadcrumb-item>
          <el-breadcrumb-item>商品列表</el-breadcrumb-item>
        </el-breadcrumb>
      </div>

      <div class="insert">  
        <el-breadcrumb separator-class="el-icon-arrow-right">
          <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
          <el-breadcrumb-item>商品管理</el-breadcrumb-item>
          <el-breadcrumb-item>添加商品</el-breadcrumb-item>
        </el-breadcrumb>
      </div>

      <div class="orderlist">
        <el-breadcrumb separator-class="el-icon-arrow-right">
          <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
          <el-breadcrumb-item>订单管理</el-breadcrumb-item>
          <el-breadcrumb-item>订单信息</el-breadcrumb-item>
        </el-breadcrumb>
      </div>

      <div class="userlist">
        <el-breadcrumb separator-class="el-icon-arrow-right">
          <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
          <el-breadcrumb-item>人员管理</el-breadcrumb-item>
          <el-breadcrumb-item>用户列表</el-breadcrumb-item>
        </el-breadcrumb>
      </div>

      <div class="emplist">
        <el-breadcrumb separator-class="el-icon-arrow-right">
          <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
          <el-breadcrumb-item>人员管理</el-breadcrumb-item>
          <el-breadcrumb-item>员工列表</el-breadcrumb-item>
        </el-breadcrumb>
      </div>

      <div class="datalist">
        <el-breadcrumb separator-class="el-icon-arrow-right">
          <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
          <el-breadcrumb-item>数据统计</el-breadcrumb-item>
          <el-breadcrumb-item>详细信息</el-breadcrumb-item>
        </el-breadcrumb>
      </div>

      <button class="quit">退出</button>
    </div>
    <!-- 侧面导航栏 -->
    <div class="app">
      <el-col :span="12" style="width: 100%;">
        <el-menu default-active="2" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose"
          background-color="#545c64" text-color="#fff" active-text-color="#ffd04b">


          <el-submenu index="1">
            <template slot="title">
              <p class="iconp">
                <i><img class="icon" src="/img/商品.png" alt="user"></i>
                <span> 商品管理</span>
              </p>
            </template>
            <el-menu-item index="1-1" id="list" class="el-item" style="color: #FFDD4B;">
              <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;商品列表</span>
            </el-menu-item>
            <el-menu-item index="1-2" id="insert" class="el-item"> <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;添加商品</span>
            </el-menu-item>
          </el-submenu>

          <el-submenu index="2">
            <template slot="title">
              <p class="iconp">
                <i><img class="icon" src="/img/订单.png" alt="user"></i>
                <span> 订单管理</span>
              </p>
            </template>
            <el-menu-item index="1-1" id="orderlist" class="el-item">
              <span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;订单信息</span>
            </el-menu-item>
          </el-submenu>

          <el-submenu index="3">
            <template slot="title">
              <p class="iconp">
                <i><img class="icon" src="/img/权限.png" alt="user"></i>
                <span> 人员管理</span>
              </p>
            </template>
            <el-menu-item index="1-1" id="user_list" class="el-item">
              <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用户列表</span>
            </el-menu-item>
            <el-menu-item index="1-2" id="emp_list" class="el-item">
              <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;员工列表</span>
            </el-menu-item>
          </el-submenu>

          <el-submenu index="4">
            <template slot="title">
              <p class="iconp">
                <i><img class="icon" src="/img/统计数据.png" alt="user"></i>
                <span> 统计数据</span>
              </p>
            </template>
            <el-menu-item index="1-1" id="data_statistics" class="el-item"><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;详细信息</span>
            </el-menu-item>
          </el-submenu>
        </el-menu>
      </el-col>
    </div>
    <div class="main" style="flex-direction: row;">
      <!-- 商品列表========================宾 -->
      <div class="product-list" id="app">
        产品类型：
        <el-select v-model="value" filterable placeholder="请选择"  @change="getAllCategoryName">
          <el-option v-for="item in categoryData" :key="item.categoryID" :label="item.categoryName" :value="item.categoryName">{{item.categoryName}}</el-option>
        </el-select>
        输入搜索：
        <el-input placeholder="输入商品名字" prefix-icon="el-icon-search" v-model="productNameSelect" style="width: 300px;"></el-input>
        <el-button type="primary" icon="el-icon-search" @click="getAllProductName()" >搜索</el-button>
        <el-table :data="tableData" style="width: 100%;" :cell-style="rowStyle" >
          <el-table-column prop="productDetailID" label="编号"></el-table-column>
          <el-table-column prop="productPicture" label="图片">
            <template slot-scope="scope">
            <img :src="scope.row.productPicture" min-width="70px" height="70px">
          </template>
          </el-table-column>
          <el-table-column prop="productName" label="名称">
            <template slot-scope="scope">
              <el-popover trigger="hover" placement="top">
                <p>商品名称: {{ scope.row.productName }}</p>
                <p>商品简介: {{ scope.row.productDescribe }}</p>
                <div slot="reference" class="name-wrapper">
                  <el-tag size="medium">{{ scope.row.productName }}</el-tag>
                </div>
              </el-popover>
            </template>
          </el-table-column>
          <el-table-column prop="categoryName" label="分类"></el-table-column>
          <el-table-column prop="attributeList" label="规格"></el-table-column>
          <el-table-column prop="productDetailPrice" label="价格"></el-table-column>
          <el-table-column prop="productDetailAmount" label="库存数量"></el-table-column>
          <el-table-column prop="statusText" label="上架/下架"></el-table-column>
          <el-table-column label="操作">
            <template slot-scope="scope">
              <el-button size="mini" type="text" @click.native.prevent="proEdit(scope.row,scope.$index)">编辑</el-button>
              <el-button type="text" style="color: red;" size="mini" @click.prevent="proDelete(scope.$index,scope.row)">
                删除
              </el-button>
            </template>
          </el-table-column>
        </el-table>
        <!-- 分页按钮 -->
        <div class="block" style="margin-top:10px;">
          <el-pagination align='center' @size-change="handleSizeChange" @current-change="handleCurrentChange"
            :current-page="pageNo" :page-sizes="[5,10,15]" :page-size="pageSize"
            layout="total, sizes, prev, pager, next, jumper" :total="totalCount">
          </el-pagination>
        </div>
        <!-- 修改弹窗 -->
        <el-dialog title="修改" :visible.sync="changeObj1" width="90%" :before-close="handleClose">
          <el-form label-position="left" :inline="true" :model="productModel" class="demo-form-inline">
            <el-form-item label="商品ID">
              <el-input v-model="proEditObj.productDetailID" disabled></el-input>
            </el-form-item>
            <el-form-item label="商品名称">
              <el-input v-model="proEditObj.productName"></el-input>
            </el-form-item>
            <el-form-item label="商品类型">
              <el-input v-model="proEditObj.categoryName"></el-input>
            </el-form-item>
            <el-form-item label="商品规格">
              <el-input v-model="proEditObj.attributeList"></el-input>
            </el-form-item>
            <el-form-item label="商品价格">
              <el-input v-model="proEditObj.productDetailPrice"></el-input>
            </el-form-item>
            <el-form-item label="图片路径">
              <el-input v-model="proEditObj.productPicture"></el-input>
            </el-form-item>
            <el-form-item label="商品简介">
              <el-input v-model="proEditObj.productDescribe"></el-input>
            </el-form-item>
            <el-form-item label="库存数量">
              <el-input v-model="proEditObj.productDetailAmount"></el-input>
            </el-form-item>
            <el-form-item label="是否上架">
              <el-input v-model="proEditObj.statusText"></el-input>
            </el-form-item>
          </el-form>
          <span slot="footer" class="dialog-footer">
            <el-button @click="changeObj1 = false">取 消</el-button>
            <el-button type="primary" @click="change()">保 存</el-button>
          </span>
        </el-dialog>
      </div>
      <!-- 添加商品========================宾 -->
      <div class="product-insert">
        <fieldset class="proinsert">
          <legend>添加商品</legend>
          <form action="">
            <input type="hidden" name="proID" id="proID" v-model="productModel.proID">

            商品名称 <input type="text" placeholder="商品名称" name="proName" id="proName" v-model="productModel.proName" /><br/><br/>

            商品类型 
            <el-select v-model="productModel.categoryName" filterable placeholder="请选择">
              <el-option v-for="item in categoryData" :key="item.categoryID" :label="item.categoryName" :value="item.categoryName">{{item.categoryName}}</el-option>
            </el-select><br/><br/>

            商品规格 <input type="text" placeholder="商品型号" name="proType" id="proType"
              v-model="productModel.proType"><br/><br/>

            商品价格 <input type="text" placeholder="商品价格" name="proPrice" id="proPrice" v-model="productModel.proPrice"><br/><br/>
            
            默认商品图片 <input type="text" placeholder="首页商品图片" name="HomePicture" id="HomePicture"
            v-model="productModel.homePicture"><br/><br/>

            商品图片 <input type="text" placeholder="商品图片" name="proImg" id="proImg" v-model="productModel.proImg"/><br/><br/>
              
            商品简介 <textarea placeholder="商品简介" name="proAbout" id="proAbout" cols="40" rows="5"
              v-model="productModel.proAbout"></textarea><br/><br/>

            库存数量 <input type="text" placeholder="库存数量" name="proAmount" id="proAmount"
              v-model="productModel.proAmount"><br/><br/>

            是否上架 <input type="radio" name="proState" id="up" value="1" v-model="productModel.proState">
            <label for="up">上架</label>
            <input type="radio" name="proState" id="down" value="0" v-model="productModel.proState">
            <label for="down">下架</label><br />

            <div style="margin: auto;width:20%;">
              <input type="button" id="save" value="保存" @click="productInsert()">
              <input type="reset" id="reset" value="重置" style="float: right;">
            </div>

          </form>
        </fieldset>
      </div>
      <!-- 订单信息 -->
      <div class="order-msg" style="text-align: center;">
          订单状态：
          <el-select v-model="value" filterable placeholder="请选择"  @change="getByOrderState">
            <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item">{{item.label}}</el-option>
          </el-select>
          <input type="reset" id="orderReset" @click="orderReset()"  />

          <el-table :data="orderData" :cell-style="rowStyle">
            <el-table-column prop="orderDetailsID" label="订单编号"></el-table-column>
            <el-table-column prop="orderDate" label="提交时间"></el-table-column>
            <el-table-column prop="productDetailID" label="商品编号"></el-table-column>
            <el-table-column prop="productName" label="商品名称"></el-table-column>
            <el-table-column prop="userAccount" label="用户编号"></el-table-column>
            <el-table-column prop="userName" label="用户名称"></el-table-column>
            <el-table-column prop="productDetailAmount" label="商品数量"></el-table-column>
            <el-table-column prop="orderTotalPrice" label="订单金额"></el-table-column>
            <el-table-column prop="orderMode" label="支付方式"></el-table-column>
            <el-table-column prop="state" label="订单状态">
              <template scope="scope">    
                <el-tag v-if="scope.row.state == 1">未付款</el-tag>
                <el-tag v-if="scope.row.state == 2">已付款</el-tag>
                <el-tag v-if="scope.row.state == 3">已发货</el-tag>
                <el-tag v-if="scope.row.state == 4">已完成</el-tag>             
              </template>
            </el-table-column>
           <el-table-column prop="state" label="是否发货">
              <template slot-scope="scope">
                <input @click="Receiving(scope.row.state)" v-if="scope.row.state == 1" type="button" value="确认发货" disabled>
                <input @click="Receiving(scope.row)" v-if="scope.row.state == 2" type="button" value="确认发货">
                <input @click="Receiving(scope.row.state)" v-if="scope.row.state == 3" type="button" value="确认发货" disabled>
                <input @click="Receiving(scope.row.state)" v-if="scope.row.state == 4" type="button" value="确认发货" disabled>
              </template>
            </el-table-column>
          </el-table>
      </div>
      <!-- 用户列表 -->
      <div class="user-list" style="text-align: center;">
        输入搜索：
        <el-input placeholder="账户/姓名" prefix-icon="el-icon-search" v-model="userNameSelect" style="width: 300px;"></el-input>
        <el-button type="primary" icon="el-icon-search" @click="getAllUserName()" >搜索</el-button>
        <el-table :data="userData" :cell-style="rowStyle">
          <el-table-column prop="userID" label="用户编号"></el-table-column>
          <el-table-column prop="userPicture" label="头像">
            <template slot-scope="scope">
              <img :src="scope.row.userPicture" min-width="70px" height="70px">
            </template>
          </el-table-column>
          <el-table-column prop="userAccount" label="账号"></el-table-column>
          <el-table-column prop="userName" label="姓名"></el-table-column>
          <el-table-column prop="userGender" label="性别"></el-table-column>
          <el-table-column prop="userPhone" label="手机号"></el-table-column>
          <el-table-column prop="userLocation" label="所在地"></el-table-column>
          <el-table-column prop="userAddress" label="收货地址"></el-table-column>
          <el-table-column prop="userDate" label="注册时间"></el-table-column>
        </el-table>
      </div>
      <!-- 员工列表 -->
      <div class="emp-list" style="text-align: center;">
        输入搜索：
        <el-input placeholder="账户/姓名" prefix-icon="el-icon-search" v-model="empNameSelect" style="width: 300px;"></el-input>
        <el-button type="primary" icon="el-icon-search" @click="getAllEmpName()" >搜索</el-button>
        <el-table :data="employeeData" :cell-style="rowStyle">
          <el-table-column prop="employeeID" label="员工编号"></el-table-column>
          <el-table-column prop="employeePicture" label="头像">
            <template slot-scope="scope">
              <img :src="scope.row.employeePicture" min-width="70px" height="70px">
            </template>
          </el-table-column>
          <el-table-column prop="employeeAccount" label="账号"></el-table-column>
          <el-table-column prop="employeeName" label="姓名"></el-table-column>
          <el-table-column prop="employeePosition" label="职位"></el-table-column>
          <el-table-column prop="employeePhone" label="手机号"></el-table-column>
          <el-table-column prop="employeeDate" label="注册时间"></el-table-column>
        </el-table>
      </div>
      <!-- 数据统计 -->
      <div class="data-statistics">
        <el-table :data="orderData" :cell-style="rowStyle">
          <el-table-column prop="orderDetailsID" label="订单编号"></el-table-column>
          <el-table-column prop="orderDate" label="商品名称"></el-table-column>
          <el-table-column prop="productDetailID" label="用户名称"></el-table-column>
          <el-table-column prop="productName" label="商品数量"></el-table-column>
          <el-table-column prop="productDetailAmount" label="商品数量"></el-table-column>
          <el-table-column prop="orderTotalPrice" label="订单金额"></el-table-column>
          <el-table-column prop="orderMode" label="支付方式"></el-table-column>
          <el-table-column prop="state" label="订单状态">
            <template scope="scope">    
              <el-tag v-if="scope.row.state == 1">未付款</el-tag>
              <el-tag v-if="scope.row.state == 2">已付款</el-tag>
              <el-tag v-if="scope.row.state == 3">已发货</el-tag>
              <el-tag v-if="scope.row.state == 4">已完成</el-tag>             
            </template>
          </el-table-column>
        </el-table>
      </div>
    </div>

  </div>
  <script src="/js/backcommon.js"></script>
  <script>

    let vm = new Vue({
      el: "#app",
      data: {
        tableData: [],
        pageNo:1,
        pageSize:5,
        totalCount:4,
        
        productModel: {
          productID: 0,
          categoryID: 0,
          productName: '',
          productPrice: 0,
          productPicture: '',
          productDescribe: '',
          productDate: '',
          state: 0,
          categoryName: '',
          productDetailID: 0,
          attributeList: '',
          productPictureList: '',
          productDetailPrice: 0,
          productDetailAmount: 0,
          statusText:''
        },
        userNameSelect:'',
        empNameSelect:'',
        productNameSelect:'',
        userData: [],
        employeeData: [],
        orderData:[],
        categoryData:[],
        isProInsert: true,
        changeObj: false, //修改按钮显示
        changeObj1: false, //修改弹窗显示
        suerIndex: 0, //修改数据的（index）
        currentPage: 1, // 当前页码
        total: 185, // 总条数
        pageSize: 5, // 每页的数据条数
        proEditObj: {
          productDetailID: 0,
          productName: '',
          categoryName: '',
          attributeList: '',
          productDetailPrice: 0,
          productPicture: '',
          productDescribe: '',
          productDetailAmount: 0,
          statusText: '',
        },
        options: [{
          value: '1',
          label: '未付款'
        }, {
          value: '2',
          label: '已付款'
        }, {
          value: '3',
          label: '已发货'
        }, ],
        value: ''
      },
      created: function () {
        this.getAll()
        this.getUserList()
        this.getEmployeeList()
        this.getOrderList()
      },
      methods: {
        rowStyle() {
          return "text-align:center";
        },
        getProductPagingList(no,size){
          axios({
            method:"GET",
            url:"/",
            params:{
              pageNo:no,
              pageSize:size
            }
          }).then(resp=>{
            vm.tableData=resp.data.data.list
            vm.totalCount=resp.data.data.count
          })
        },
        handleSizeChange(val) {
          console.log(`每页 ${val} 条`);
          this.currentPage = 1;
          this.pageSize = val;
        },
        //当前页改变时触发 跳转其他页
        handleCurrentChange(val) {
          console.log(`当前页: ${val}`);
          this.currentPage = val;
        },
        handleOpen(key, keyPath) {
          console.log(key, keyPath);
        },
        handleClose(key, keyPath) {
          console.log(key, keyPath);
        },
        // 商品显示
        getAll: function () {
          //商品信息
          axios.post("/backProductDetail/getAll").then(function (resp) {
            vm.tableData = resp.data.data
          });
          // 商品类型
          axios.get("/BackCategory/getAll").then(function (resp) {
            vm.categoryData = resp.data.data
          });
        },
        // 商品类型搜索
        getAllCategoryName(e) {
          axios.get("/backProductDetail/typeAll", { params: { typeName: e } }).
            then(function(resp){
              if(200==resp.data.code){
                if(resp.data.data==0){
                  alert('没有此分类的商品信息')
                }else{
                  vm.tableData=resp.data.data
                }
              }
          });
        },
        //商品搜索框查询
        getAllProductName: function () {
          axios.get("/backProductDetail/getAllName", { params: { name: vm.productNameSelect } })
            .then(function (resp) {
              if(200==resp.data.code){
                if(resp.data.data==0){
                  alert('没有此分类的商品信息')
                }else{
                  vm.tableData=resp.data.data
                }
              }
            })
        },
        // 商品添加----宾
        productInsert: function () {
          axios.post('/backProduct/insert', vm.productModel).then((resp) => {
            if (200 == resp.data.code) {
              this.$message({
                message: "添加成功！",
                type: "success"
              })
              vm.productModel={}
              vm.getAll()
            }
          }).catch((error) => {
            this.$message({
              message: "添加失败！",
              type: "error"
            });
          });
        },
        // 商品修改跳转按钮
        proEdit(item, index) {
          console.log(item)
          vm.isProInsert = true
          //修改数据的数据显示
          this.changeObj1 = true;
          this.suerIndex = index + (this.currpage - 1) * this.pagesize;
          this.proEditObj = {
            productDetailID: item.productDetailID,
            productName: item.productName,
            categoryName: item.categoryName,
            attributeList: item.attributeList,
            productDetailPrice: item.productDetailPrice,
            productPicture: item.productPicture,
            productDescribe: item.productDescribe,
            productDetailAmount: item.productDetailAmount,
            statusText: item.statusText
          }
        },
        //商品修改----宾
        change() {
          if (!this.proEditObj.productName) {
            this.$message({
              message: "请输入商品名称",
              type: "warning"
            });
            return;
          }
          if (!this.proEditObj.categoryName) {
            this.$message({
              message: "请输入商品类型",
              type: "warning"
            });
            return;
          }
          if (!this.proEditObj.attributeList) {
            this.$message({
              message: "请输入商品规格",
              type: "warning"
            });
            return;
          }
          if (!this.proEditObj.productDetailPrice) {
            this.$message({
              message: "请输入商品价格",
              type: "warning"
            });
            return;
          }
          if (!this.proEditObj.productPicture) {
            this.$message({
              message: "请输入商品图片",
              type: "warning"
            });
            return;
          }
          if (!this.proEditObj.productDescribe) {
            this.$message({
              message: "请输入商品描述",
              type: "warning"
            });
            return;
          }
          if (!this.proEditObj.productDetailAmount) {
            this.$message({
              message: "请输入商品数量",
              type: "warning"
            });
            return;
          }
          if (!this.proEditObj.statusText) {
            this.$message({
              message: "请输入是否上架",
              type: "warning"
            });
            return;
          }
          axios.post("/backProduct/update",
            {
              productDetailID: this.proEditObj.productDetailID,
              productName: this.proEditObj.productName,
              categoryName: this.proEditObj.categoryName,
              attributeList: this.proEditObj.attributeList,
              productDetailPrice: this.proEditObj.productDetailPrice,
              productPicture: this.proEditObj.productPicture,
              productDescribe: this.proEditObj.productDescribe,
              productDetailAmount: this.proEditObj.productDetailAmount,
              statusText: this.proEditObj.statusText
            }
          )
            .then(resp => {
              this.$options.methods.getAll();
              if (resp.data.code == 200) {
                this.$message({
                  message: "修改成功！",
                  type: "success"
                });
                this.$set(this.list, this.suerIndex, this.proEditObj);
              } else {
                this.$message({
                  message: '修改失败',
                  type: "warning"
                });
              }
            })
            .catch((error) => {
              this.$message({
                message: "修改失败！",
                type: "error"
              });
            });
          this.changeObj1 = false;

        },
        //弹框关闭
        handleClose() {
          this.dialogVisible = false;
          this.changeObj1 = false;
        },
        //商品删除
        proDelete: function (index,row) {
          this.$confirm('确定删除该商品数据?', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning'
          }).then(() => {
            axios.get("/backProductDetail/deleteById?id=" + row.productDetailID)
              .then((resp) => {
                if (200 == resp.data.code) {
                  this.$message({
                    type: 'success',
                    message: '删除成功!'
                  });
                  vm.getAll();
                }
              });
          }).catch(() => {
            this.$message({
              type: 'info',
              message: '已取消删除'
            });
          });
        },
        // 显示订单数据
        getOrderList:function(){
          axios.post("/backOrder/getAll").then(function(resp){
            vm.orderData=resp.data.data
          }) 
        },
        // 订单状态下拉框
        getByOrderState(e){
          axios.get("/backOrder/getAllState",{params:{orderState:e.value}}).
            then(function(resp){
              if(200==resp.data.code){
                if(resp.data.data==0){
                  alert('没有此类订单')
                }else{
                  vm.orderData=resp.data.data
                }
              }
          })
        },
        // 发货按钮
        Receiving:function(row){
            this.$confirm('是否发货?', '提示', {
              confirmButtonText: '确定',
              cancelButtonText: '取消',
              type: 'warning'
            }).then(() => {
              axios.get("/backOrder/update?orderID="+row.orderID+"&account="+row.userAccount+"&state=3")
                .then((resp) => {
                  console.log(resp.data.code)
                  if (200 == resp.data.code) {
                    
                    this.$message({
                      type: 'success',
                      message: '发货成功!'
                    });
                    this.getOrderList();
                  }
                });
            }).catch(() => {
              this.$message({
                type: 'info',
                message: '已取消'
              });
            });
        },
        // 重置
        orderReset:function(){
            vm.getOrderList()
        },
        //用户操作
        getUserList: function () {
          //用户信息
          axios.get("/backUser/getAll").then(function (resp) {
            vm.userData = resp.data.data
          });
        },
        //用户查询名字或账号
        getAllUserName: function () {
          axios.get("/backUser/getAllName", { params: { name: vm.userNameSelect} })
            .then(function (resp) {
              if (200 == resp.data.code) {
                if(resp.data.data==0){
                  alert('没有此用户信息')
                }else{
                  vm.userData=resp.data.data
                }
              }
            });
        },
        //重置
        userReset: function () {
           vm.getUserList()
        },
        //员工操作
        getEmployeeList: function () {
          axios.get("/backEmployee/getAll").then(function (resp) {
            vm.employeeData = resp.data.data
          })
        },
        //员工查询名字或账号
        getAllEmpName: function () {
          axios.get("/backEmployee/getAllAccount", { params: { empAccount: vm.empNameSelect } })
            .then(function (resp) {
              if (200 == resp.data.code) {
                if(resp.data.data==0){
                  alert('没有此员工信息')
                }else{
                  vm.employeeData=resp.data.data
                }
              }
            })
        },
        //重置
        empReset: function () {
          vm.getEmployeeList()
        }
      }
    })
  </script>
  <script src="/js/Backstage.js"></script>
</body>

</html>